package com.wzh.dao;

import com.wzh.pojo.Po.Personques;
import com.wzh.pojo.Po.Questions;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface Personquesdao {
	@Delete("delete from personquestion where userid=#{userid} and qid=#{qid}")
	int deonebyid(Personques personques);

	@Insert("insert into personquestion (qid,userid) value (#{qid},#{userid})")
	int addnew(Personques personques);

	@Select("select question.qid,question.Degree,question.kown,question.sa,question.sb,question.sc,question.sd,question.sw,question.title from question,personquestion where question.qid=personquestion.qid and personquestion.userid=#{userid}")
	List<Questions> getsome(int userid);


}
